package com.xialuo.common.lang;

import java.io.Serializable;
import lombok.Data;

@Data
public class Result implements Serializable {

    private int code; //200正常 非200不正常
    private String msg;
    private Object data;

    public static Result success(int code,String msg,Object data){


        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        result.setData(data);

        return result;

    }
    public static Result fail(String msg){


        Result result = new Result();
        result.setMsg(msg);


        return result;

    }

}
